<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="/Store/Public/Admin/lib/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/Store/Public/Admin/lib/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/Store/Public/layui/css/layui.css"></link>
<script src="/Store/Public/Admin/js1/jquery-1.10.1.min.js"></script>
<script src="/Store/Public/layer/layer.js"></script>
</head>
<body>


 <div class="layui-form-item">
   <label class="layui-form-label">编辑角色</label>
    <div class="layui-input-block">
    <input type="text" name="name"  id="name"data-id="<?php echo ($id); ?>" value="<?php echo ($name); ?>" required  lay-verify="required" placeholder="Please enter a role" autocomplete="off" class="layui-input" style="width:70%">
</div>
        
	<div class="row cl">
		<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
		    <button class="btn btn-success radius" id="commit" name="admin-role-save"><i class="icon-ok"></i> 确定</button>
		</div>
	</div>
</div>
<script>

	$('#tijiao').click(function(){
		var id=$('#name').attr('data-id');
		var name=$('#name').val();
			
		$.post('/Store/index.php/Admin/Role/role_save',{id:id,name:name},function(obj){
			if(obj.pass==1) {		  
				layer.msg(obj.msg,{time:1000,icon:1});
			}
		}) 
	})
	
</script>
</body>
</html>